import sys

from wakeonlan import send_magic_packet

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print('参数错误 请传递MAC IP')
    send_magic_packet(sys.argv[1], ip_address=sys.argv[2])
    print(sys.argv[1] +' '+sys.argv[2] +' Successfully sent a wake-up magic packet')
    # send_magic_packet('B4-2E-99-7F-59-8B', ip_address='172.31.86.15')
